﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using Informant.UI.Views;

namespace Informant.UI.Wpf
{
	/// <summary>
	/// Interaction logic for App.xaml
	/// </summary>
	public partial class App : Application
	{
		protected override void OnStartup(StartupEventArgs e)
		{
			MainWindow mainWindow = new MainWindow();
			Controller.Instance.Register<IViewContainer>(mainWindow);
			Controller.Instance.Register<ILogOnView, LogOnView>();
			Controller.Instance.Register<ISmsMessagingView, SmsMessagingView>();
			mainWindow.Navigate(Controller.Instance.Get<ILogOnView>());
			Application.Current.MainWindow = mainWindow;
			Application.Current.MainWindow.Show();
			base.OnStartup(e);
		}
		protected override void OnExit(ExitEventArgs e)
		{
			ApplicationContext.Instance.LogOff(null);
			base.OnExit(e);
		}
	}
}
